using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._TurnFeatureClass
{
    /// <summary>
    /// <para>Update by Geometry</para>
    /// <para>Updates all the edge references in the turn feature class using the geometry of the turn features. This tool is useful when the IDs listed for the turn can no longer find the edges participating in the turn due to edits to the underlying edges.</para>
    /// <para>使用转弯要素的几何更新转弯要素类中的所有边参照。当为转弯列出的 ID 由于对基础边的编辑而无法再找到参与转弯的边时，此工具非常有用。</para>
    /// </summary>    
    [DisplayName("Update by Geometry")]
    public class UpdateByGeometry : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public UpdateByGeometry()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_turn_features">
        /// <para>Input Turn Feature Class</para>
        /// <para>The turn feature class to be updated.</para>
        /// <para>要更新的转弯要素类。</para>
        /// </param>
        public UpdateByGeometry(object _in_turn_features)
        {
            this._in_turn_features = _in_turn_features;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Update by Geometry";

        public override string CallName => "na.UpdateByGeometry";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_turn_features, _out_turn_features];

        /// <summary>
        /// <para>Input Turn Feature Class</para>
        /// <para>The turn feature class to be updated.</para>
        /// <para>要更新的转弯要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Turn Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_turn_features { get; set; }


        /// <summary>
        /// <para>Updated Input Turn Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Turn Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_turn_features { get; set; }


        public UpdateByGeometry SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}